home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
AMIGA
/
(A)F
/
(A)F1.ADF
/
makefont.c
< prev
next >
Wrap
C/C++ Source or Header
|
1986-06-01
|
2KB
|
69 lines
/*********************************************************/
/* */
/* Program to create micro.font file */
/* */
/* by:Bobby Deen */
/* 629 Winchester Dr. */
/* Richardson, Texas 75080 */
/* Permanent (Home) Phone: (214) 235-4391 */
/* Temporary (School) Phone: (409) 268-0207 */
/* */
/* Please feel free to give this program and */
/* associated font to anyone and everyone. All I */
/* ask is that you retain the credits. */
/* */
/* This program creates the micro.font header file for */
/* the very small character set. Put the file it */
/* generates on workbench:fonts/micro.font */
/* You then assemble the microfnt.asm file and put it */
/* in workbench:fonts/micro/6 */
/* See ROM Kernel manual (V1.1) p. 2-202 for more */
/* details. */
/* */
/*********************************************************/
#include <fcntl.h>
main()
{
int file;
short int word; /* Kludgy but quick 2-byte buffer */
int status, i;
char name[256];
file = creat ("micro.font", O_WRONLY);
word = 0x0F00;
status = write (file, &word, 2);
if (status != 2)
exit(100);
word = 0x0001;
status = write (file, &word, 2);
if (status != 2)
exit(101);
for (i=0; i<256; i++)
name[i] = '\0';
strcpy (name, "micro/6");
status = write (file, name, 256);
if (status != 256)
exit(102);
word = 0x0006;
status = write (file, &word, 2);
if (status != 2)
exit(103);
word = 0x0060;
status = write (file, &word, 2);
if (status != 2)
exit(104);
status = close(file);
if (status)
exit(105);
}